//#########################################################################
//                              WackiEngie
//           Copyright (c) 2014 Marc Wacker. All rights reserved.
//#########################################################################

#pragma once

#include "WeUtilPrerequisites.h"
#include "WeLog.h"

namespace WackiEngine
{

	class Debug
	{
	public:
		Debug();

		void log(const String& msg, const String& channel, const String& file, uint32 line);
		void printConsole(const String& msg);

		Log& getLog() { return _log; }

	private:
		Log _log;

		void printLogEntry(const LogEntry& entry);
	};

	Debug& gDebug();

#define LOG(msg, channel)	WackiEngine::gDebug().log(msg, channel, __FILE__, __LINE__)
#define LOGINFO(msg)		WackiEngine::gDebug().log(msg, "Info", __FILE__, __LINE__)
#define LOGDBG(msg)		WackiEngine::gDebug().log(msg, "Debug", __FILE__, __LINE__)
#define LOGWRN(msg)		WackiEngine::gDebug().log(msg, "Warning", __FILE__, __LINE__)
#define LOGERR(msg)		WackiEngine::gDebug().log(msg, "Error", __FILE__, __LINE__)

}